package pl.javarsovia.javarsovia4android.activities;

import static pl.javarsovia.javarsovia4android.util.UIUtils.*;
import pl.javarsovia.R;
import pl.javarsovia.javarsovia4android.domain.Speaker;
import pl.javarsovia.javarsovia4android.util.ImageManager;
import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.os.Bundle;

/**
 * @author mgrzechocinski
 * @since 2010-06-13
 */
public class SpeakerDetailsActivity extends Activity {

	public static final String CHOSEN_SPEAKER_KEY = "chosenSpeaker";

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.speaker_details);

		Speaker speaker = (Speaker) getIntent().getExtras().get(CHOSEN_SPEAKER_KEY);

		fillTextView(this, R.id.speaker_name, speaker.getName());
		fillTextView(this, R.id.speaker_details_note, speaker.getNote());
		Drawable image = ImageManager.getInstance().getImage(speaker.getPhotoUrl());
		fillImageView(this, R.id.speaker_photo, image);

	}
}
